package springtest.beetl;

import java.io.File;
import java.io.IOException;

import org.beetl.core.Configuration;
import org.beetl.core.GroupTemplate;
import org.beetl.core.Template;
import org.beetl.core.resource.StringTemplateResourceLoader;

/**
 * @author chenzhiqiang
 * @date 2018-07-31 15:06:11
 */

public class Test222 {

    public static void main(String[] args) throws IOException {
        StringTemplateResourceLoader resourceLoader = new StringTemplateResourceLoader();
        Configuration cfg = Configuration.defaultConfiguration();
        GroupTemplate gt = new GroupTemplate(resourceLoader, cfg);
        Template t = gt.getTemplate("hello,${name}");
        t.binding("name", "beetl");
        String str = t.render();
        System.out.println(str);
        System.out.println(1);
        String url = "E:/pdf/123.html";
        String pdf = "D:/Temp/pdf/craetePdf.pdf";
        File f = new File(url);
        System.out.println(f.toURI().toURL().toString());
    }

}
